package account

import (
	"context"
	"gf_blog_admin/internal/service"

	"gf_blog_admin/api/account/v1"
)

func (c *ControllerV1) AuthLogin(ctx context.Context, req *v1.AuthLoginReq) (res *v1.AuthLoginRes, err error) {
	res = &v1.AuthLoginRes{}
	res.AccessToken, res.ExpiresIn, err = service.Auth().Login(ctx, &req.AuthLoginInPut)
	return
}
